﻿import QtQuick 2.15
import QtQuick.Controls 2.15

Item {
    width: screenWidth
    height: screenHeight

    Item{
        id:backGround
        anchors.fill: parent
    }

    Rectangle{
        anchors.fill: backGround
        color: "#09295c"
    }



    Rectangle{
        anchors.top: backGround.top
        anchors.topMargin: 210
        anchors.left: backGround.left
        anchors.leftMargin: 10
        color: "#0b49b0"
        border.width: 1
        border.color: "#008edd"
        width: 1060
        height: 1400

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 100
            anchors.left: parent.left
            anchors.leftMargin: 50
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"刀盘上限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 100
            anchors.left: parent.left
            anchors.leftMargin: 300
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 刀盘上限位置
                id:knifeUpLimit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.knifeUpLimit
            }

            TextInput{
                id:knifeUpLimit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:knifeUpLimit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     knifeUpLimit.text = knifeUpLimit_Input.text
                //     knifeUpLimit_Input.visible = false
                //     knifeUpLimit.visible = true
                // }
                onAccepted: {
                    knifeUpLimit_Input.visible = false
                    knifeUpLimit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3344",knifeUpLimit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    knifeUpLimit.visible = false
                    knifeUpLimit_Input.visible = true
                    knifeUpLimit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 100
            anchors.left: parent.left
            anchors.leftMargin: 560
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"刀盘下限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 100
            anchors.left: parent.left
            anchors.leftMargin: 820
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 刀盘下限位置
                id:knifeDownLimit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.knifeDownLimit
            }

            TextInput{
                id:knifeDownLimit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:knifeDownLimit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     knifeDownLimit.text = knifeDownLimit_Input.text
                //     knifeDownLimit_Input.visible = false
                //     knifeDownLimit.visible = true
                // }
                onAccepted: {
                    knifeDownLimit_Input.visible = false
                    knifeDownLimit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3348",knifeDownLimit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    knifeDownLimit.visible = false
                    knifeDownLimit_Input.visible = true
                    knifeDownLimit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 220
            anchors.left: parent.left
            anchors.leftMargin: 50
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"胶辊上限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 220
            anchors.left: parent.left
            anchors.leftMargin: 300
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 胶辊上限位置
                id:rollerUpLimit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.rollerUpLimit
            }

            TextInput{
                id:rollerUpLimit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:rollerUpLimit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     rollerUpLimit.text = rollerUpLimit_Input.text
                //     rollerUpLimit_Input.visible = false
                //     rollerUpLimit.visible = true
                // }
                onAccepted: {
                    rollerUpLimit_Input.visible = false
                    rollerUpLimit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3352",rollerUpLimit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    rollerUpLimit.visible = false
                    rollerUpLimit_Input.visible = true
                    rollerUpLimit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 220
            anchors.left: parent.left
            anchors.leftMargin: 560
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"胶辊下限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 220
            anchors.left: parent.left
            anchors.leftMargin: 820
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 胶辊下限位置
                id:rollerDownLimit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.rollerDownLimit
            }

            TextInput{
                id:rollerDownLimit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:rollerDownLimit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     rollerDownLimit.text = rollerDownLimit_Input.text
                //     rollerDownLimit_Input.visible = false
                //     rollerDownLimit.visible = true
                // }
                onAccepted: {
                    rollerDownLimit_Input.visible = false
                    rollerDownLimit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3356",rollerDownLimit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    rollerDownLimit.visible = false
                    rollerDownLimit_Input.visible = true
                    rollerDownLimit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 340
            anchors.left: parent.left
            anchors.leftMargin: 50
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"压力1前限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 340
            anchors.left: parent.left
            anchors.leftMargin: 300
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 压力1前限位置
                id:stress01_F_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.stress01_F_Limit
            }

            TextInput{
                id:stress01_F_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:stress01_F_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     stress01_F_Limit.text = stress01_F_Limit_Input.text
                //     stress01_F_Limit_Input.visible = false
                //     stress01_F_Limit.visible = true
                // }
                onAccepted: {
                    stress01_F_Limit_Input.visible = false
                    stress01_F_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3360",stress01_F_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    stress01_F_Limit.visible = false
                    stress01_F_Limit_Input.visible = true
                    stress01_F_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 340
            anchors.left: parent.left
            anchors.leftMargin: 560
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"压力1后限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 340
            anchors.left: parent.left
            anchors.leftMargin: 820
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 压力1后限位置
                id:stress01_B_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.stress01_B_Limit
            }

            TextInput{
                id:stress01_B_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:stress01_B_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     stress01_B_Limit.text = stress01_B_Limit_Input.text
                //     stress01_B_Limit_Input.visible = false
                //     stress01_B_Limit.visible = true
                // }
                onAccepted: {
                    stress01_B_Limit_Input.visible = false
                    stress01_B_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3364",stress01_B_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    stress01_B_Limit.visible = false
                    stress01_B_Limit_Input.visible = true
                    stress01_B_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 460
            anchors.left: parent.left
            anchors.leftMargin: 50
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"压力2前限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 460
            anchors.left: parent.left
            anchors.leftMargin: 300
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 压力2前限位置
                id:stress02_F_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.stress02_F_Limit
            }

            TextInput{
                id:stress02_F_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:stress02_F_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     stress02_F_Limit.text = stress02_F_Limit_Input.text
                //     stress02_F_Limit_Input.visible = false
                //     stress02_F_Limit.visible = true
                // }
                onAccepted: {
                    stress02_F_Limit_Input.visible = false
                    stress02_F_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3368",stress02_F_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    stress02_F_Limit.visible = false
                    stress02_F_Limit_Input.visible = true
                    stress02_F_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 460
            anchors.left: parent.left
            anchors.leftMargin: 560
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"压力2后限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 460
            anchors.left: parent.left
            anchors.leftMargin: 820
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 压力2后限位置
                id:stress02_B_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.stress02_B_Limit
            }

            TextInput{
                id:stress02_B_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:stress02_B_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     stress02_B_Limit.text = stress02_B_Limit_Input.text
                //     stress02_B_Limit_Input.visible = false
                //     stress02_B_Limit.visible = true
                // }
                onAccepted: {
                    stress02_B_Limit_Input.visible = false
                    stress02_B_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3372",stress02_B_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    stress02_B_Limit.visible = false
                    stress02_B_Limit_Input.visible = true
                    stress02_B_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 580
            anchors.left: parent.left
            anchors.leftMargin: 50
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"压力3前限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 580
            anchors.left: parent.left
            anchors.leftMargin: 300
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 压力3前限位置
                id:stress03_F_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.stress03_F_Limit
            }

            TextInput{
                id:stress03_F_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:stress03_F_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     stress03_F_Limit.text = stress03_F_Limit_Input.text
                //     stress03_F_Limit_Input.visible = false
                //     stress03_F_Limit.visible = true
                // }
                onAccepted: {
                    stress03_F_Limit_Input.visible = false
                    stress03_F_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3376",stress03_F_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    stress03_F_Limit.visible = false
                    stress03_F_Limit_Input.visible = true
                    stress03_F_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 580
            anchors.left: parent.left
            anchors.leftMargin: 560
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"压力3后限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 580
            anchors.left: parent.left
            anchors.leftMargin: 820
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 压力3后限位置
                id:stress03_B_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.stress03_B_Limit
            }

            TextInput{
                id:stress03_B_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:stress03_B_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     stress03_B_Limit.text = stress03_B_Limit_Input.text
                //     stress03_B_Limit_Input.visible = false
                //     stress03_B_Limit.visible = true
                // }
                onAccepted: {
                    stress03_B_Limit_Input.visible = false
                    stress03_B_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3380",stress03_B_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    stress03_B_Limit.visible = false
                    stress03_B_Limit_Input.visible = true
                    stress03_B_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 700
            anchors.left: parent.left
            anchors.leftMargin: 50
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"前刀1上限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 700
            anchors.left: parent.left
            anchors.leftMargin: 300
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 前刀1上限位置
                id:f_Knife01_Up_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.f_knife01_UpLimit
            }

            TextInput{
                id:f_Knife01_Up_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:f_Knife01_Up_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     f_Knife01_Up_Limit.text = f_Knife01_Up_Limit_Input.text
                //     f_Knife01_Up_Limit_Input.visible = false
                //     f_Knife01_Up_Limit.visible = true
                // }

                onAccepted: {
                    f_Knife01_Up_Limit_Input.visible = false
                    f_Knife01_Up_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3384",f_Knife01_Up_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    f_Knife01_Up_Limit.visible = false
                    f_Knife01_Up_Limit_Input.visible = true
                    f_Knife01_Up_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 700
            anchors.left: parent.left
            anchors.leftMargin: 560
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"前刀1后限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 700
            anchors.left: parent.left
            anchors.leftMargin: 820
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 前刀1下限位置
                id:f_Knife01_Down_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.f_knife01_DownLimit
            }

            TextInput{
                id:f_Knife01_Down_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:f_Knife01_Down_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     f_Knife01_Down_Limit.text = f_Knife01_Down_Limit_Input.text
                //     f_Knife01_Down_Limit_Input.visible = false
                //     f_Knife01_Down_Limit.visible = true
                // }
                onAccepted: {
                    f_Knife01_Down_Limit_Input.visible = false
                    f_Knife01_Down_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3388",f_Knife01_Down_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    f_Knife01_Down_Limit.visible = false
                    f_Knife01_Down_Limit_Input.visible = true
                    f_Knife01_Down_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 820
            anchors.left: parent.left
            anchors.leftMargin: 50
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"前刀2上限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 820
            anchors.left: parent.left
            anchors.leftMargin: 300
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 前刀2上限位置
                id:f_Knife02_Up_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.f_knife02_UpLimit
            }

            TextInput{
                id:f_Knife02_Up_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:f_Knife02_Up_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     f_Knife02_Up_Limit.text = f_Knife02_Up_Limit_Input.text
                //     f_Knife02_Up_Limit_Input.visible = false
                //     f_Knife02_Up_Limit.visible = true
                // }
                onAccepted: {
                    f_Knife02_Up_Limit_Input.visible = false
                    f_Knife02_Up_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3392",f_Knife02_Up_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    f_Knife02_Up_Limit.visible = false
                    f_Knife02_Up_Limit_Input.visible = true
                    f_Knife02_Up_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 820
            anchors.left: parent.left
            anchors.leftMargin: 560
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"前刀2后限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 820
            anchors.left: parent.left
            anchors.leftMargin: 820
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 前刀2下限位置
                id:f_Knife02_Down_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.f_knife02_DownLimit
            }

            TextInput{
                id:f_Knife02_Down_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:f_Knife02_Down_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     f_Knife02_Down_Limit.text = f_Knife02_Down_Limit_Input.text
                //     f_Knife02_Down_Limit_Input.visible = false
                //     f_Knife02_Down_Limit.visible = true
                // }
                onAccepted: {
                    f_Knife02_Down_Limit_Input.visible = false
                    f_Knife02_Down_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3396",f_Knife02_Down_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    f_Knife02_Down_Limit.visible = false
                    f_Knife02_Down_Limit_Input.visible = true
                    f_Knife02_Down_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 940
            anchors.left: parent.left
            anchors.leftMargin: 50
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"前刀3上限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 940
            anchors.left: parent.left
            anchors.leftMargin: 300
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 前刀3上限位置
                id:f_Knife03_Up_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.f_knife03_UpLimit
            }

            TextInput{
                id:f_Knife03_Up_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:f_Knife03_Up_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     f_Knife03_Up_Limit.text = f_Knife03_Up_Limit_Input.text
                //     f_Knife03_Up_Limit_Input.visible = false
                //     f_Knife03_Up_Limit.visible = true
                // }
                onAccepted: {
                    f_Knife03_Up_Limit_Input.visible = false
                    f_Knife03_Up_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3400",f_Knife03_Up_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    f_Knife03_Up_Limit.visible = false
                    f_Knife03_Up_Limit_Input.visible = true
                    f_Knife03_Up_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 940
            anchors.left: parent.left
            anchors.leftMargin: 560
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"前刀3后限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 940
            anchors.left: parent.left
            anchors.leftMargin: 820
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 前刀3下限位置
                id:f_Knife03_Down_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.f_knife03_DownLimit
            }

            TextInput{
                id:f_Knife03_Down_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:f_Knife03_Down_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     f_Knife03_Down_Limit.text = f_Knife03_Down_Limit_Input.text
                //     f_Knife03_Down_Limit_Input.visible = false
                //     f_Knife03_Down_Limit.visible = true
                // }
                onAccepted: {
                    f_Knife03_Down_Limit_Input.visible = false
                    f_Knife03_Down_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3404",f_Knife03_Down_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    f_Knife03_Down_Limit.visible = false
                    f_Knife03_Down_Limit_Input.visible = true
                    f_Knife03_Down_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1060
            anchors.left: parent.left
            anchors.leftMargin: 50
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"后刀1上限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1060
            anchors.left: parent.left
            anchors.leftMargin: 300
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 后刀1上限位置
                id:b_Knife01_Up_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.b_knife01_UpLimit
            }

            TextInput{
                id:b_Knife01_Up_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:b_Knife01_Up_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     b_Knife01_Up_Limit.text = b_Knife01_Up_Limit_Input.text
                //     b_Knife01_Up_Limit_Input.visible = false
                //     b_Knife01_Up_Limit.visible = true
                // }
                onAccepted: {
                    b_Knife01_Up_Limit_Input.visible = false
                    b_Knife01_Up_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3408",b_Knife01_Up_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    b_Knife01_Up_Limit.visible = false
                    b_Knife01_Up_Limit_Input.visible = true
                    b_Knife01_Up_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1060
            anchors.left: parent.left
            anchors.leftMargin: 560
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"后刀1后限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1060
            anchors.left: parent.left
            anchors.leftMargin: 820
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 后刀1下限位置
                id:b_Knife01_Down_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.b_knife01_DownLimit
            }

            TextInput{
                id:b_Knife01_Down_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:b_Knife01_Down_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     b_Knife01_Down_Limit.text = b_Knife01_Down_Limit_Input.text
                //     b_Knife01_Down_Limit_Input.visible = false
                //     b_Knife01_Down_Limit.visible = true
                // }
                onAccepted: {
                    b_Knife01_Down_Limit_Input.visible = false
                    b_Knife01_Down_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3412",b_Knife01_Down_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    b_Knife01_Down_Limit.visible = false
                    b_Knife01_Down_Limit_Input.visible = true
                    b_Knife01_Down_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1180
            anchors.left: parent.left
            anchors.leftMargin: 50
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"后刀2上限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1180
            anchors.left: parent.left
            anchors.leftMargin: 300
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 后刀2上限位置
                id:b_Knife02_Up_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.b_knife02_UpLimit
            }

            TextInput{
                id:b_Knife02_Up_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:b_Knife02_Up_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     b_Knife02_Up_Limit.text = b_Knife02_Up_Limit_Input.text
                //     b_Knife02_Up_Limit_Input.visible = false
                //     b_Knife02_Up_Limit.visible = true
                // }
                onAccepted: {
                    b_Knife02_Up_Limit_Input.visible = false
                    b_Knife02_Up_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3416",b_Knife02_Up_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    b_Knife02_Up_Limit.visible = false
                    b_Knife02_Up_Limit_Input.visible = true
                    b_Knife02_Up_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1180
            anchors.left: parent.left
            anchors.leftMargin: 560
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"后刀2后限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1180
            anchors.left: parent.left
            anchors.leftMargin: 820
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 后刀2下限位置
                id:b_Knife02_Down_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.b_knife02_DownLimit
            }

            TextInput{
                id:b_Knife02_Down_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:b_Knife02_Down_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     b_Knife02_Down_Limit.text = b_Knife02_Down_Limit_Input.text
                //     b_Knife02_Down_Limit_Input.visible = false
                //     b_Knife02_Down_Limit.visible = true
                // }
                onAccepted: {
                    b_Knife02_Down_Limit_Input.visible = false
                    b_Knife02_Down_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3420",b_Knife02_Down_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    b_Knife02_Down_Limit.visible = false
                    b_Knife02_Down_Limit_Input.visible = true
                    b_Knife02_Down_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1300
            anchors.left: parent.left
            anchors.leftMargin: 50
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"后刀3上限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1300
            anchors.left: parent.left
            anchors.leftMargin: 300
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 后刀3上限位置
                id:b_Knife03_Up_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.b_knife03_UpLimit
            }

            TextInput{
                id:b_Knife03_Up_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:b_Knife03_Up_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     b_Knife03_Up_Limit.text = b_Knife03_Up_Limit_Input.text
                //     b_Knife03_Up_Limit_Input.visible = false
                //     b_Knife03_Up_Limit.visible = true
                // }
                onAccepted: {
                    b_Knife03_Up_Limit_Input.visible = false
                    b_Knife03_Up_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3424",b_Knife03_Up_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    b_Knife03_Up_Limit.visible = false
                    b_Knife03_Up_Limit_Input.visible = true
                    b_Knife03_Up_Limit_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1300
            anchors.left: parent.left
            anchors.leftMargin: 560
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"后刀3后限位置"
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1300
            anchors.left: parent.left
            anchors.leftMargin: 820
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 后刀3下限位置
                id:b_Knife03_Down_Limit
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.b_knife03_DownLimit
            }

            TextInput{
                id:b_Knife03_Down_Limit_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:b_Knife03_Down_Limit.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     b_Knife03_Down_Limit.text = b_Knife03_Down_Limit_Input.text
                //     b_Knife03_Down_Limit_Input.visible = false
                //     b_Knife03_Down_Limit.visible = true
                // }
                onAccepted: {
                    b_Knife03_Down_Limit_Input.visible = false
                    b_Knife03_Down_Limit.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3428",b_Knife03_Down_Limit_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    b_Knife03_Down_Limit.visible = false
                    b_Knife03_Down_Limit_Input.visible = true
                    b_Knife03_Down_Limit_Input.forceActiveFocus()
                }
            }
        }
    }
}
